Fix .env launch time loading#93
Open
zpalmtree wants to merge 1 commit into
Open
Conversation
|
Sent from ProtonMail for iOS On Thu, Sep 30, 2021 at 8:33 PM, zpalmtree ***@***.***> wrote: Description
The initial go live date of the candy machine is loaded from the .env file. However, javascript's Date constructor expects to be given a value in milliseconds, not seconds, as is the convention for unix timestamps.
This bug may not have been observed, as the true go live date is loaded from the candy machine soon after page load.
Type of change
Please delete options that are not relevant.
Bug fix
How Has This Been Tested?
Set REACT_APP_CANDY_START_DATE to a unix timestamp in the future, such as 1640998800 (2022)
Set candy machine backing it to have the same start date
Observe on load the 'Mint' button will be available for a few seconds before state is fetched from the server.
Presumably this can be extended for testing by disabling internet connection
After patch applied, Mint button should correctly show countdown right after page load
You can view, comment on, or merge this pull request online at:
#93
Commit Summary
Fix timestamp loading
File Changes
M
src/Home.tsx
(2)
Patch Links:
https://github.com/exiled-apes/candy-machine-mint/pull/93.patch
https://github.com/exiled-apes/candy-machine-mint/pull/93.diff
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The initial go live date of the candy machine is loaded from the
.envfile. However, javascript'sDateconstructor expects to be given a value inmilliseconds, notseconds, as is the convention for unix timestamps.This bug may not have been observed, as the true go live date is loaded from the candy machine soon after page load.
Type of change
How Has This Been Tested?
REACT_APP_CANDY_START_DATEto a unix timestamp in the future, such as1640998800(2022)